/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.upc.sunat.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author u02728
 */
@Entity
@Table(name = "SUNARP")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Sunarp.findAll", query = "SELECT s FROM Sunarp s"),
    @NamedQuery(name = "Sunarp.findByNumeroPlaca", query = "SELECT s FROM Sunarp s WHERE s.numeroPlaca = :numeroPlaca"),
    @NamedQuery(name = "Sunarp.findByNumeroSerie", query = "SELECT s FROM Sunarp s WHERE s.numeroSerie = :numeroSerie"),
    @NamedQuery(name = "Sunarp.findByNumeroVin", query = "SELECT s FROM Sunarp s WHERE s.numeroVin = :numeroVin"),
    @NamedQuery(name = "Sunarp.findByNumeroMotor", query = "SELECT s FROM Sunarp s WHERE s.numeroMotor = :numeroMotor"),
    @NamedQuery(name = "Sunarp.findByColor", query = "SELECT s FROM Sunarp s WHERE s.color = :color"),
    @NamedQuery(name = "Sunarp.findByMarca", query = "SELECT s FROM Sunarp s WHERE s.marca = :marca"),
    @NamedQuery(name = "Sunarp.findByModelo", query = "SELECT s FROM Sunarp s WHERE s.modelo = :modelo"),
    @NamedQuery(name = "Sunarp.findByPropietario", query = "SELECT s FROM Sunarp s WHERE s.propietario = :propietario"),
    @NamedQuery(name = "Sunarp.findBySede", query = "SELECT s FROM Sunarp s WHERE s.sede = :sede"),
    @NamedQuery(name = "Sunarp.findByEstado", query = "SELECT s FROM Sunarp s WHERE s.estado = :estado")})
public class Sunarp implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 6)
    @Column(name = "NUMERO_PLACA")
    private String numeroPlaca;
    @Size(max = 17)
    @Column(name = "NUMERO_SERIE")
    private String numeroSerie;
    @Size(max = 17)
    @Column(name = "NUMERO_VIN")
    private String numeroVin;
    @Size(max = 15)
    @Column(name = "NUMERO_MOTOR")
    private String numeroMotor;
    @Size(max = 50)
    @Column(name = "COLOR")
    private String color;
    @Size(max = 50)
    @Column(name = "MARCA")
    private String marca;
    @Size(max = 80)
    @Column(name = "MODELO")
    private String modelo;
    @Size(max = 80)
    @Column(name = "PROPIETARIO")
    private String propietario;
    @Size(max = 50)
    @Column(name = "SEDE")
    private String sede;
    @Size(max = 20)
    @Column(name = "ESTADO")
    private String estado;

    public Sunarp() {
    }

    public Sunarp(String numeroPlaca) {
        this.numeroPlaca = numeroPlaca;
    }

    public String getNumeroPlaca() {
        return numeroPlaca;
    }

    public void setNumeroPlaca(String numeroPlaca) {
        this.numeroPlaca = numeroPlaca;
    }

    public String getNumeroSerie() {
        return numeroSerie;
    }

    public void setNumeroSerie(String numeroSerie) {
        this.numeroSerie = numeroSerie;
    }

    public String getNumeroVin() {
        return numeroVin;
    }

    public void setNumeroVin(String numeroVin) {
        this.numeroVin = numeroVin;
    }

    public String getNumeroMotor() {
        return numeroMotor;
    }

    public void setNumeroMotor(String numeroMotor) {
        this.numeroMotor = numeroMotor;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getMarca() {
        return marca;
    }

    public void setMarca(String marca) {
        this.marca = marca;
    }

    public String getModelo() {
        return modelo;
    }

    public void setModelo(String modelo) {
        this.modelo = modelo;
    }

    public String getPropietario() {
        return propietario;
    }

    public void setPropietario(String propietario) {
        this.propietario = propietario;
    }

    public String getSede() {
        return sede;
    }

    public void setSede(String sede) {
        this.sede = sede;
    }

    public String getEstado() {
        return estado;
    }

    public void setEstado(String estado) {
        this.estado = estado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (numeroPlaca != null ? numeroPlaca.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Sunarp)) {
            return false;
        }
        Sunarp other = (Sunarp) object;
        if ((this.numeroPlaca == null && other.numeroPlaca != null) || (this.numeroPlaca != null && !this.numeroPlaca.equals(other.numeroPlaca))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.sunarpentity.Sunarp[ numeroPlaca=" + numeroPlaca + " ]";
    }
    
}
